package com.ruoyi.site.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 音乐曲目对象 tracks
 * 
 * @author chuckeytang
 * @date 2025-08-17
 */
public class Tracks extends BaseEntity
{

    /** 用于筛选的字段，不映射到数据库列，只用于接收前端参数 */
    private String genres; // 用于接收逗号分隔的流派 slug
    private String moods;  // 用于接收逗号分隔的情绪 slug
    private Long minBpm;   // 最小BPM
    private Long maxBpm;   // 最大BPM
    private Long minDuration; // 最小持续时间
    private Long maxDuration; // 最大持续时间
    private String author; // 艺术家，与 artist 字段对应

    /** 标准授权价格 */
    @Excel(name = "标准授权价格")
    private BigDecimal standardPrice;

    /** 15秒预览音频URL */
    @Excel(name = "15秒预览音频URL")
    private String previewUrl15s;

    /** 30秒预览音频URL */
    @Excel(name = "30秒预览音频URL")
    private String previewUrl30s;

    /** 60秒预览音频URL */
    @Excel(name = "60秒预览音频URL")
    private String previewUrl60s;

    /** 排序字段 */
    private String orderByColumn;

    /** 排序方式，如 asc, desc */
    private String isAsc;

    /** 关联的音乐曲目数量（用于筛选器列表） */
    private Long count;

    // Getter 和 Setter 方法
    public String getGenres() {
        return genres;
    }

    public void setGenres(String genres) {
        this.genres = genres;
    }

    public String getMoods() {
        return moods;
    }

    public void setMoods(String moods) {
        this.moods = moods;
    }

    public Long getMinBpm() {
        return minBpm;
    }

    public void setMinBpm(Long minBpm) {
        this.minBpm = minBpm;
    }

    public Long getMaxBpm() {
        return maxBpm;
    }

    public void setMaxBpm(Long maxBpm) {
        this.maxBpm = maxBpm;
    }

    public Long getMinDuration() {
        return minDuration;
    }

    public void setMinDuration(Long minDuration) {
        this.minDuration = minDuration;
    }

    public Long getMaxDuration() {
        return maxDuration;
    }

    public void setMaxDuration(Long maxDuration) {
        this.maxDuration = maxDuration;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public void setCount(Long count) {
        this.count = count;
    }

    public Long getCount() {
        return count;
    }

    private static final long serialVersionUID = 1L;

    /** 唯一标识音乐曲目的ID */
    private Long trackId;

    /** 音乐标题 */
    @Excel(name = "音乐标题")
    private String title;

    /** 音乐描述 */
    @Excel(name = "音乐描述")
    private String description;

    /** 音乐封面图片的URL地址 */
    @Excel(name = "音乐封面图片的URL地址")
    private String imageUrl;

    /** 封面图片的替代文本 */
    @Excel(name = "封面图片的替代文本")
    private String imageAltText;

    /** 艺术家/作者名称 */
    @Excel(name = "艺术家/作者名称")
    private String artist;

    /** 音频文件的URL地址 */
    @Excel(name = "音频文件的URL地址")
    private String audioFileUrl;

    /** 节拍数（Beats Per Minute） */
    @Excel(name = "节拍数", readConverterExp = "B=eats,P=er,M=inute")
    private Long bpm;

    /** 音乐时长，单位：秒 */
    @Excel(name = "音乐时长，单位：秒")
    private Long duration;

    /** 音乐类型（如：instrumental, vocal） */
    @Excel(name = "音乐类型", readConverterExp = "如=：instrumental,,v=ocal")
    private String type;

    /** 授权类型（如：free, commercial） */
    @Excel(name = "授权类型", readConverterExp = "如=：free,,c=ommercial")
    private String licenseType;

    /** 下载次数 */
    @Excel(name = "下载次数")
    private Long downloadCount;

    /** 是否为精选曲目（0否，1是） */
    @Excel(name = "是否为精选曲目", readConverterExp = "0=否，1是")
    private Integer isFeatured;

    /** 是否启用/可用（0否，1是） */
    @Excel(name = "是否启用/可用", readConverterExp = "0=否，1是")
    private Integer isActive;

    /** 记录创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "记录创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    /** 记录更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "记录更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedAt;

    /** 音乐标签列表 */
    private List<Tags> tags;

    public List<Tags> getTags() {
        return tags;
    }

    public void setTags(List<Tags> tags) {
        this.tags = tags;
    }

    public void setTrackId(Long trackId) 
    {
        this.trackId = trackId;
    }

    public Long getTrackId() 
    {
        return trackId;
    }

    public void setTitle(String title) 
    {
        this.title = title;
    }

    public String getTitle() 
    {
        return title;
    }

    public void setDescription(String description) 
    {
        this.description = description;
    }

    public String getDescription() 
    {
        return description;
    }

    public void setImageUrl(String imageUrl) 
    {
        this.imageUrl = imageUrl;
    }

    public String getImageUrl() 
    {
        return imageUrl;
    }

    public void setImageAltText(String imageAltText) 
    {
        this.imageAltText = imageAltText;
    }

    public String getImageAltText() 
    {
        return imageAltText;
    }

    public void setArtist(String artist) 
    {
        this.artist = artist;
    }

    public String getArtist() 
    {
        return artist;
    }

    public void setAudioFileUrl(String audioFileUrl) 
    {
        this.audioFileUrl = audioFileUrl;
    }

    public String getAudioFileUrl() 
    {
        return audioFileUrl;
    }

    public void setBpm(Long bpm) 
    {
        this.bpm = bpm;
    }

    public Long getBpm() 
    {
        return bpm;
    }

    public void setDuration(Long duration) 
    {
        this.duration = duration;
    }

    public Long getDuration() 
    {
        return duration;
    }

    public void setType(String type) 
    {
        this.type = type;
    }

    public String getType() 
    {
        return type;
    }

    public void setLicenseType(String licenseType) 
    {
        this.licenseType = licenseType;
    }

    public String getLicenseType() 
    {
        return licenseType;
    }

    public void setDownloadCount(Long downloadCount) 
    {
        this.downloadCount = downloadCount;
    }

    public Long getDownloadCount() 
    {
        return downloadCount;
    }

    public void setIsFeatured(Integer isFeatured) 
    {
        this.isFeatured = isFeatured;
    }

    public Integer getIsFeatured() 
    {
        return isFeatured;
    }

    public void setIsActive(Integer isActive) 
    {
        this.isActive = isActive;
    }

    public Integer getIsActive() 
    {
        return isActive;
    }

    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }

    public void setUpdatedAt(Date updatedAt) 
    {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt() 
    {
        return updatedAt;
    }


    public String getOrderByColumn() {
        return orderByColumn;
    }

    public void setOrderByColumn(String orderByColumn) {
        this.orderByColumn = orderByColumn;
    }

    public String getIsAsc() {
        return isAsc;
    }

    public void setIsAsc(String isAsc) {
        this.isAsc = isAsc;
    }


    /** 音乐制作年份 */
    @Excel(name = "音乐制作年份")
    private Integer productionYear;

    public Integer getProductionYear() {
        return productionYear;
    }

    public void setProductionYear(Integer productionYear) {
        this.productionYear = productionYear;
    }


    public String getPreviewUrl15s() {
        return previewUrl15s;
    }

    public void setPreviewUrl15s(String previewUrl15s) {
        this.previewUrl15s = previewUrl15s;
    }

    public String getPreviewUrl30s() {
        return previewUrl30s;
    }

    public void setPreviewUrl30s(String previewUrl30s) {
        this.previewUrl30s = previewUrl30s;
    }

    public String getPreviewUrl60s() {
        return previewUrl60s;
    }

    public void setPreviewUrl60s(String previewUrl60s) {
        this.previewUrl60s = previewUrl60s;
    }

    public BigDecimal getStandardPrice() {
        return standardPrice;
    }

    public void setStandardPrice(BigDecimal standardPrice) {
        this.standardPrice = standardPrice;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("trackId", getTrackId())
            .append("title", getTitle())
            .append("description", getDescription())
            .append("imageUrl", getImageUrl())
            .append("imageAltText", getImageAltText())
            .append("artist", getArtist())
            .append("audioFileUrl", getAudioFileUrl())
            .append("previewUrl15s", getPreviewUrl15s())
            .append("previewUrl30s", getPreviewUrl30s())
            .append("previewUrl60s", getPreviewUrl60s())
            .append("bpm", getBpm())
            .append("duration", getDuration())
            .append("type", getType())
            .append("licenseType", getLicenseType())
            .append("downloadCount", getDownloadCount())
            .append("isFeatured", getIsFeatured())
            .append("isActive", getIsActive())
            .append("createdAt", getCreatedAt())
            .append("updatedAt", getUpdatedAt())
            .append("productionYear", getProductionYear())
            .append("orderByColumn", getOrderByColumn())
            .append("isAsc", getIsAsc())
            .append("tags", getTags())
            .append("count", getCount())
            .append("standardPrice", getStandardPrice())
            .toString();
    }
}
